home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
plotting
/
grfsy
/
grafsys.doc
< prev
next >
Wrap
Text File
|
1991-06-10
|
76KB
|
1,943 lines
GRAFSYS (TM) SCIENTIFIC PLOTTING PACKAGE
Version 2.01
User Manual and Reference
TABLE OF CONTENTS
I. COPYRIGHT NOTICE . . . . . . . . . . . . . . . . . . . . . 1
II. LICENSE INFORMATION . . . . . . . . . . . . . . . . . . . 2
III. SYSTEM REQUIREMENTS . . . . . . . . . . . . . . . . . . 4
IV. INSTALLATION . . . . . . . . . . . . . . . . . . . . . . 5
V. RUNNING GRAFSYS . . . . . . . . . . . . . . . . . . . . . 7
VI. GRAFSYS MENU SYSTEM . . . . . . . . . . . . . . . . . . 8
VII. FILE FORMAT REFERENCE . . . . . . . . . . . . . . . . . 9
VIII. COMMAND LANGUAGE REFERENCE . . . . . . . . . . . . . 11
IX. CHARACTER FONT . . . . . . . . . . . . . . . . . . . . 33
X. DEVICE AND COLOR SUPPORT REFERENCE . . . . . . . . . . . 36
XI. PRINTGL SOFTWARE AND THE LASERJET . . . . . . . . . . . 37
XII. FGRAPH MATHEMATICAL FUNCTION GRAPHING PROGRAM . . . . 39
XIII. WARRANTY DISCLAIMER . . . . . . . . . . . . . . . . . 41
XIV. TRADEMARKS AND ACKNOWLEDGEMENTS . . . . . . . . . . . 41
GRAFSYS (TM) SCIENTIFIC PLOTTING PACKAGE
Version 2.01
User Manual and Reference
I. COPYRIGHT NOTICE
Copyright (C) 1990 by Francis J. Deck. All rights reserved.
All parts of the GRAFSYS package are protected by copyright.
You may use GRAFSYS on your system in order to test and
evaluate it. You are encouraged to make unmodified copies
of the original distribution disk and pass them along to
others.
If you decide to make use of GRAFSYS, you must become a
registered user. See Section II for details on how to do
this.
The word GRAFSYS is a trademark of Francis J. Deck.
GRAFSYS Page 2
II. LICENSE INFORMATION
A. Price Schedule
1. Individuals and Corporations
The basic license fee is U.S. $35, plus 5% Indiana
sales tax if applicable. Use the order form at
the end of this document. Or, you can have
GRAFSYS print out an order blank in the About
GRAFSYS menu.
2. Students
The student license fee is U.S. $15, plus 5%
Indiana sales tax if applicable. You must provide
some kind of proof that you are currently enrolled
as a student, such as a photocopy of your student
I.D.
3. Quantity Discount
You can buy multiple GRAFSYS licenses for use
within a single organization at a substantial
reduction in price. The price for multiple copies
is:
$35 * sqrt(n)
In other words, you take the square root of the
number of licenses and multiply by $35. The
multiple license allows you to install GRAFSYS on
n computers. You will receive two copies of the
GRAFSYS disks with your order, regardless of n.
You are expected to take care of distribution of
GRAFSYS within your organization.
B. Purchase Orders
Purchase orders (net 30) from companies, schools, or
the government in the U.S. and Canada will also be
accepted. Send your order to this address:
Francis Deck
P.O. Box 611
Notre Dame, Indiana 46556-0611
Make checks payable to:
Francis J. Deck
GRAFSYS Page 3
You may not use a purchase order to purchase a license
at the student price.
C. Benefits of Registration
1. You will receive a disk containing the latest
version of GRAFSYS. Please specify 3.5" or 5.25"
disk size.
2. You will be informed of the next update.
3. Your software license permits you to use GRAFSYS
on one computer at a time. The license covers all
future versions of GRAFSYS, but you are
responsible for obtaining a copy of any update
beyond the single copy you are entitled to upon
registration. Generally, you can obtain an
updated copy from a reputable Shareware
distributor or bulletin board. The following
company has agreed to distribute copies of
GRAFSYS, at a reasonable price:
Public Brand Software
P.O. Box 51315
Indianapolis, IN 46251
1-800-426-DISK
1-800-727-3476 in Indiana
317-856-7571 in Indianapolis
Since I cannot provide the kind of distribution
services that PBS can, I decided that it is better
if users obtained update copies from them, rather
than me. I will keep PBS updated with the latest
version.
GRAFSYS Page 4
III. SYSTEM REQUIREMENTS
GRAFSYS will operate on IBM PC and fully-compatible
computers, and on many non-DOS computers which have a DOS
"window." The following are minimum requirements:
* PC- or MS-DOS 2.00 or higher.
* Two floppy drives, or one floppy and one hard drive.
* At least 384K memory, but the more the merrier!
* A standard graphics adapter.
The following hardcopy devices are supported:
* Postscript PDL devices including the Apple Laserwriter.
* HP-GL devices including Hewlett-Packard 7470A pen
plotter.
* IBM Graphics-compatible dot matrix printers, including
most Epsons.
* In conjunction with PrintGL, which is included on the
GRAFSYS disk, the following printers are supported:
HP LaserJet, DeskJet, and compatibles
HP PaintJet
HP QuietJet
IBM Proprinter
IBM QuietWriter
IBM LaserPrinter
IBM ExecJet
Canon BJ and LBP
Epson 9- and 24-pin printers
NEC 24-pin printers
Most printers are "compatible" with one of these.
Check your manual.
GRAFSYS Page 5
IV. INSTALLATION
A. Files on Your Distribution Disks
Your distribution disk should contain the following
files:
GRAFSYS.ZIP Main GRAFSYS system.
PKUNZIP.EXE .ZIP file extraction program.
INSTALL.DOC Installation instructions.
B. Hard Disk Installation
This example uses C:\GRAFSYS. You could use any other
drive or directory:
C:
CD \
MD GRAFSYS
CD GRAFSYS
COPY A:*.*
PKUNZIP *.ZIP
C. Floppy Disk Installation
Use PKUNZIP to put the following files on a single
floppy disk:
GRAFSYS.EXE
FGRAPH.EXE
GRAFSYS.OVR
GRAFSYS.FNT
GRAFSYS.HLP
INITOPT.CMD
*.BGI
To run GRAFSYS, insert the disk in drive A: (for
example), and type:
A:
GRAFSYS
Later, you can unpack the rest of the GRAFSYS files
onto a second disk as you need them.
E. GRAFSYS Files
The following files are part of the GRAFSYS package.
The files with extension .ZIP contain more than one
file inside them:
GRAFSYS Page 6
GRAFSYS.ZIP Main GRAFSYS system.
GRAFSYS.EXE Main program.
GRAFSYS.OVR Program overlay file.
GRAFSYS.HLP Help file.
GRAFSYS.FNT Font file.
INITOPT.CMD Defaults file.
CGA.BGI Borland graphics display
EGAVGA.BGI drivers.
HERC.BGI
PC3270.BGI
IBM8514.BGI
ATT.BGI
PRINTGL.EXE PrintGL program.
PRINTGL.ZIP PrintGL documentation and
support files.
GRAFSYS.DOC This document.
REFCARD.DOC Quick reference card.
LASERJET.DOC LaserJet support notes.
UPDATE.DOC Update notes.
*.DAT Sample data files.
*.CMD Sample command files.
GPRINT.EXE Driver program for PrintGL.
FGRAPH.EXE Program for graphing math
functions.
HPGL2PIC.EXE Support for Micrografx
Designer .PIC graphics file
format.
INSTALL.DOC Brief installation
instructions.
PKUNZIP.EXE Program for extracting .ZIP
files.
GRAFSYS Page 7
V. RUNNING GRAFSYS
A. Menu-Driven Mode
At the DOS prompt, type:
GRAFSYS
B. Command File Mode
The GRAFSYS command language is a psuedo programming
language which permits operation of GRAFSYS in a
"batch" mode. It is particularly useful if you want to
have a program you have written produce graphics
output. Rather than having to write special device
drivers, your program just creates a GRAFSYS command
file. Then, you run GRAFSYS and supply it with the
command file name as follows:
GRAFSYS file1 file2 ... filen
where file1 etc. are the names of one or more command
files for GRAFSYS to execute. The files will be
executed one after another, unless a QUIT command is
encountered, in which case GRAFSYS will halt.
You can also execute a command file from inside
GRAFSYS, using the Command File menu option.
WARNING: The command file INITOPT.CMD is sacred. It
is automatically read when GRAFSYS starts up, and
causes all option variables to be initialized. If a
line of this file is missing, that option will go un-
initialized, resulting in unpredictable operation.
Look at SAMPLE.CMD for an example of a command file.
Try:
GRAFSYS SAMPLE.CMD
You can adjust the "defaults" of GRAFSYS by modifying
INITOPT.CMD, but do so with care, and never by removing
a command. Don't distribute copies of GRAFSYS with
modified INITOPT.CMD, since your modifications could
disrupt someone else's system.
GRAFSYS Page 8
VI. GRAFSYS MENU SYSTEM
Most users will operate GRAFSYS via its user-friendly menu
system. Each menu displays a list of selections, some of
which include a "value." You can browse through the menus
by using the following keys:
Key: Action:
---- -------
Up, Down Arrows Move highlight bar up and down.
Return Select highlighted item.
Esc Exit current menu.
F1 Display help about highlighted
item.
Each menu item also has a number. You can select an item by
typing its number, followed by pressing the Return key.
GRAFSYS will support a mouse if you have resident mouse
support installed on your system. This is usually achieved
by running a program called MOUSE.COM which came with your
mouse.
GRAFSYS Page 9
VII. FILE FORMAT REFERENCE
A. Data Point Files
A data point file must be a plain ASCII "text" file,
such as produced by a text editor. If a file is
readable through the DOS TYPE or PRINT command, then it
is probably readable by GRAFSYS. Most languages
automatically produce output in a correct format,
unless you tell them to do otherwise. In FORTRAN, just
free-format your output files, with spaces between
numbers.
The file must contain one point per line, with no blank
lines. A free multicolumn format must be followed, and
the meaning of each column depends on the type of error
bars desired. The columns don't have to line up
neatly. The following table gives the designations of
each column for the various error bar types. The first
two columns in the table give the type of error bar for
each axis.
TABLE OF POINT FILE FORMATS
X Y Col#1 Col#2 Col#3 Col#4 Col#5 Col#6
---------------------------------------------------
None None X Y
None Symm. X Y dY
None Asymm. X Y dY- dY+
Symm. None X Y dX
Symm. Symm. X Y dX dY
Symm. Asymm. X Y dX dY- dY+
Asymm. None X Y dX- dX+
Asymm. Symm. X Y dX- dX+ dY
Asymm. Asymm. X Y dX- dX+ dY- dY+
The "d" refers to the distance of the end of the error
bar from the point "centroid" (X,Y). Hence, for
symmetrical Y error bars, a vertical bar whose height
is twice dY will be rendered. For asymmetrical error
bars, two distances are needed, the first for the lower
bound, and the second for the upper bound.
If there are less columns in a line than required for a
particular error bar type, an error will result. If
there are more, the extra columns will be ignored, and
a warning message will be generated.
B. GRAFSYS Command Language Files
These are DOS "text" files containing commands to
GRAFSYS Page 10
GRAFSYS, written in a psuedo programming language. A
command file has one command per line, with blank lines
permitted. A semicolon is used to delimit comments.
More information about these files can be found in the
Command Language Reference section, page 11. The
initialization option file INITOPT.CMD is an example of
a command language file. Also, look at SAMPLE.CMD on
your distribution disk.
GRAFSYS Page 11
VIII. COMMAND LANGUAGE REFERENCE
A. Introduction
This Reference documents the GRAFSYS Command Language.
It assumes that you already have some familiarity with
GRAFSYS.
B. Program Structure
A command file should be thought of as a "program",
written in a special command language. Each command
consists of an isolated keyword or a keyword followed
by a parameter list. You must observe these basic
rules:
* The command file must end with an END statement.
* No mor than one command per line.
* Blank lines are permitted.
* Everything to the right of a semicolon is a
comment, unless the semicolon is part of a literal
string.
C. Literal Constants
No "variables" are permitted in the command language.
Hence, all fields in a command's parameter list must be
filled by literal constants. These may be keywords,
strings, or numerics.
1. Keywords
Keywords must be typed exactly as spelled in the
Reference, with no intervening blanks. Keywords
are case-insensitive.
2. Strings
Strings are enclosed in single quotes. If you
want a literal string to contain a single quote
mark, use two consecutive single quotes.
3. Numerics
Numeric format is quite free. In some cases, a
nonintegral value would have no meaning.
4. Data Points
GRAFSYS Page 12
An INLINEDATA command is to be followed by a list
of one or more data points. The format for these
lines is exactly the same as in a data point file,
described above in File Format Reference. A
comment line all by itself terminates inline data.
D. Syntax Convention
The following convention will be used for syntax
descriptions:
CAPITALS Indicate keywords.
lowercase Indicate "variable" fields, which may be
filled with numerics, strings, or keywords.
'quotes' Indicate a string field. The quotes must be
included literally in the command file.
| If two or more keywords are separated by the
style bar, then one of these keywords is to
be selected.
[ ] Square brackets indicate a part of the
command which is either optional, or whose
existence is dependent on the value of
another field.
Each entry in the Command Reference will be headed by
the keyword in capital letters. Following this will be
a description of the command, its syntax, and comments.
E. Command Reference
No outline headings will be used in this section. Commands
are arranged in alphabetical order.
AXISLABEL
Purpose: Labels for the axes.
Syntax: AXISLABEL X|Y 'label'
Comment: See the section on Character Font, page 33,
for how to use the backslash character to
delimit special character codes.
Example: AXISLABEL X 'frequency (MHz)'
AXISLABEL Y '\omega\ (s\sup\-1\sub\)'
GRAFSYS Page 13
AXISLINE
Purpose: Line attributes for axes.
Syntax: AXISLINE w p c
w Width of line in inches.
p SOLID
DOTS
SHORTDASH
LONGDASH
DOTDASH
DOTDOTDASH
NONE
c Color.
Example: AXISLINE 0.01 SOLID 1
Depends on: COLORMAP
AXISTEXT
Purpose: Text attributes for axis labels.
Syntax: AXISTEXT h c
h Character height in inches.
c Color.
Example: AXISTEXT 0.15 1
Depends on: COLORMAP
GRAFSYS Page 14
BACKGROUND
Purpose: Plot background color.
Syntax: BACKGROUND c
c User color of background.
Comment: See the Device and Color Support Reference,
page 36, for additional notes on using this
command.
Example: BACKGROUND 0
Depends on: COLORMAP
BORDER
Purpose: Draw or hide border around entire plot.
Syntax: BORDER YES|NO
Example: BORDER NO
BORDERLINE
Purpose: Line attributes for plot border.
Syntax: BORDERLINE w p c
w Width of line
p SOLID, DOTS, SHORTDASH, LONGDASH,
DOTDASH, DOTDOTDASH, NONE
c User color.
Example: BORDERLINE 0.01 SOLID 1
GRAFSYS Page 15
COLORMAP
Purpose: Maps color numbers to device color codes.
Syntax: COLORMAP dev n r
dev DMP, HP, POST, SCRN
n "User" color number from 0 to 15. Must
be an integer.
r "Device" color number used by device to
represent color. May be an integer or
real, and is device-dependent.
Comment: If you want to use color in GRAFSYS, you must
set up a color map. See the Device and Color
Support Reference section below for
instructions.
Example: COLORMAP DMP 0 0
GRAFSYS Page 16
DATAFILE
Purpose: Read a data file.
Syntax: DATAFILE 'p' ebars
ebars NOERRBARS
ERRBARS Y--Symmetrical
XNYA X--None, Y--Asymm.
XSYN X--Symm., Y--None
XSYS X--Symm., Y--Symm.
XSYA X--Symm., Y--Asymm.
XAYN X--Asymm., Y--None.
XAYS X--Asymm., Y--Symm.
XAYA X--Asymm., Y--Asymm.
p Full DOS pathname of data file.
Comment: You must "set up" certain options before
executing this command:
PLOTSYMBLINE
PLOTSYMBSIZE
PLOTLINE
INCLUDE
PLOTSYMBOL
ERRBARSHOW
GROUPSCALING
FILLSYMBOL
Note the "None" selection for both FITLINE
and PLOTSYMBOL. This is how you decide
whether a group will be rendered as a curve,
scatter plot, or both. The attributes of the
point group will come from the last occurance
of any of the above commands. If you do not
want to change an attribute between groups,
or are comfortable with GRAFSYS's defaults,
you can omit the corresponding command.
The column format of the file must match the
type of error bars chosen above. See the
File Format Reference, page 9.
Example: DATAFILE 'SAMPLE.DAT' ERRBARS
Depends on: PLOTSYMBLINE, PLOTLINE, INCLUDE,
PLOTSYMBOL.
DATATEXT
GRAFSYS Page 17
Purpose: Places a text string anywhere on the plot.
Syntax: DATATEXT x y ang ht col 'string'
x y Location of lower left-hand corner of
text string, in "data" units, meaning as
measured by the x and y rulers on the
plot. The command PLOTTEXT is the same
as DATATEXT, but x and y are specified
in inches from lower left-hand corner of
plot.
ang Angle of rotation of text, in degrees
counterclockwise from horizontal.
ht Height of characters in inches.
col Color in "user" units.
Comment: The string can contain special GRAFSYS
characters for special symbols, superscripts,
subscripts, etc. Also see PLOTTEXT.
Example: DATATEXT 1 1 0 0.1 1 'Hello There'
DEVICEPATH
Purpose: Default output path for hardcopy devices.
Syntax: DEVICEPATH dev 'p'
dev DMP, HP, POST, SCRN
p Full pathname of destination file or
logical device for hardcopy output.
Example: DEVICE DMP 'PRN'
GRAFSYS Page 18
DISPTICKS
Purpose: Displace ruler tick marks towards the outside
of the data plotting area.
Syntax: DISPTICKS X|Y r
r Real number from 0 to 1 which indicates
the fraction of the ruler tick mark
which will extend outside the plotting
area.
Example: DISPTICKS X 0
EBARFMT
Purpose: Error bar format.
Syntax: EBARFMT fmt
fmt BARANDMARKS
BARONLY
MARKSONLY
Example: EBARFMT BARANDMARKS
END
Purpose: Signal end of command file.
Syntax: END
Comment: END is mandatory at the end of a command
file. If the intent is to force GRAFSYS to
terminate execution entirely, the QUIT
command should be used, but the file must
still terminate with an END command, after
QUIT.
Example: END
GRAFSYS Page 19
ERRBARSHOW
Purpose: Allows error bars to be read in from a file,
but hidden from view.
Syntax: ERRBARSHOW YES|NO
Comment: All subsequent DATAFILE commands will be
affected by the last ERRBARSHOW. The idea is
to precede a DATAFILE command with
ERRBARSHOW.
Example: ERRBARSHOW YES
EXPLABELS
Purpose: Select "exponential" ruler labels.
Syntax: EXPLABELS X|Y YES|NO
Comment: In exponential (YES) mode, only the
significand of each number is printed on the
ruler. The exponent part is included in the
axis text label. Otherwise, the entire
number is printed on the ruler.
Example: EXPLABELS X NO
FILLSYMBOL
Purpose: Causes plot symbols to be filled with color.
Syntax: FILLSYMBOL YES|NO
Comment: All subsequent DATAFILE commands will be
affected by this command. The idea is to
precede DATAFILE with a FILLSYMBOL.
Note that only Postscript devices support
filled symbols.
Example: FILLSYMBOL YES
GRAFSYS Page 20
FINESPACING
Purpose: The small space GRAFSYS places between plot
elements for readability.
Syntax: FINESPACING l
Example: FINESPACING 0.05
FONT
Purpose: Select a GRAFSYS character font.
Syntax: FONT 'path'
path Name of file containing GRAFSYS
font.
Example: FONT '|GRAFSYS.FNT'
FONTLEADING
Purpose: Determine the font leading ratio.
Syntax: FONTLEADING r
r Font leading ratio.
Comment: The font leading ratio is the ratio of the
amount of blank space left between successive
text and numeric characters to the character
height. In other words, a larger ratio means
more space between the letters.
Example: FONTLEADING 0.5
FULLBOX
Purpose: Select full or half box around data point
area.
Syntax: FULLBOX YES|NO
Example: FULLBOX YES
GRAFSYS Page 21
GRIDLINE
Purpose: Line attributes for plot grid.
Syntax: GRIDLINE wid patt color
wid Width of line in inches.
patt SOLID
DOTS
SHORTDASH
LONGDASH
DOTDASH
DOTDOTDASH
NONE
color Color in user units.
Example: GRIDLINE 0.01 DASHES 1
GRIDLINES
Purpose: Grid lines in data point area.
Syntax: GRIDLINES X|Y YES|NO
Comment: If grid lines are selected, a line is drawn
across the plot at the location of each ruler
numeric label.
Note that more sophisticated grid drawing is
not supported because journals don't accept
graphs with grid lines.
Example: GRIDLINES X YES
GROUPSCALING
Purpose: Shifting and expansion of group data points.
Syntax: GROUPSCALING x0 x1 y0 y1
Comment: The point (x,y) is mapped into the point (x0
+ x1*x, y0 + y1*x). This affects subsequent
groups read by DATAFILE command. The data
points themselves are not changed.
Example: GROUPSCALING 0 1 0 1
GRAFSYS Page 22
HPPENSPEED
Purpose: Sets the pen speed on the HP pen plotter.
Syntax: HPPENSPEED s
s Speed in cm/s
Comment: The default value of 38.1 cm/s is fine when
using the special paper or film supplied by
HP, but is too fast for plain paper. We
recommend a speed of 15 cm/s for plain paper.
Example: HPPENSPEED 38.1
INCLUDE
Purpose: Sets include status for subsequent point
groups.
Syntax: INCLUDE YES|NO
YES Include subsequent groups during data
ranging.
NO Ignore subsequent groups during data
ranging.
Comment: A good programming practice would be to have
an INCLUDE statement before every DATAFILE
statement.
Example: INCLUDE YES
GRAFSYS Page 23
INLINEDATA
Purpose: Signal the start of an inline data group in
the command file
Syntax: INLINEDATA ebars
ebars NOERRBARS
ERRBARS Y--Symmetrical
XNYA X--None, Y--Asymm.
XSYN X--Symm., Y--None
XSYS X--Symm., Y--Symm.
XSYA X--Symm., Y--Asymm.
XAYN X--Asymm., Y--None.
XAYS X--Asymm., Y--Symm.
XAYA X--Asymm., Y--Asymm.
p Full DOS pathname of data file.
Comment: The full syntax for an inline data group is:
INLINEDATA ebars
x1 y1[ d1...]
x2 y2[ d2...]
....
xn yn[ dn...]
;comment line
The INLINEDATA command signals GRAFSYS that a
data group follows in the command file. The
syntax for the data points is exactly as in a
data point file. A comment line terminates
inline data. A command file can have as many
inline data groups as it wants.
You must "set up" certain options before
executing this command:
PLOTSYMBLINE
PLOTSYMBSIZE
PLOTLINE
INCLUDE
PLOTSYMBOL
ERRBARSHOW
GROUPSCALING
FILLSYMBOL
Note the "None" selection for both FITLINE
and PLOTSYMBOL. This is how you decide
whether a group will be rendered as a curve,
a group of symbols, or both. The attributes
GRAFSYS Page 24
of the point group will come from the last
occurance of any of the above commands. If
you do not want to change an attribute
between groups, or are comfortable with
GRAFSYS's defaults, you can omit the
corresponding command.
The column format of the file must match the
type of error bars chosen above.
Example: PLOTSYMBOL SQUARE
INLINEDATA ERRBARS
0.0 0.0 0.05
1.1 1.1 0.04
2.2 2.2 0.02
;END OF INLINE DATA
LOGFLOOR
Purpose: Sets "floor" for data values in log or dB
plotting.
Syntax: LOGFLOOR X|Y r
r Floor value
Comment: During log or dB scaling, if an X or Y value
is found to below r, then it will be given
the value of r prior to log conversion. This
is useful if you have want to make a log plot
of data which have some zero or negative
points.
Example: LOGFLOOR Y 0.1
MENUCOLOR
Purpose: Sets menu foreground color.
Syntax: MENUCOLOR c
c Integer user color value
Comment: See supplemental document on colors for notes
on how to use this command.
Example: MENUCOLOR 1
Depends on: COLORMAP.
GRAFSYS Page 25
MINORTICK
Purpose: Sets number of minor tick mark divisions.
Syntax: MINORTICK X|Y n
n Number if minor tick mark divisions.
Example: MINORTICK X 5
NEEDLEBASE
Purpose: Sets baseline for "needle" plotting symbol.
Syntax: NEEDLEBASE y
Comment: The "needle" plotting symbol is drawn as a
vertical line segment starting from the data
point centroid and ending at a "baseline" y
value. Needle marks may point upward or
downward from the baseline. If the baseline
y value is outside the plot area, the needle
mark will be drawn to the top or bottom of
the plot area. If a logarithmic y scale is
selected then the bottom of the plot area
will always be used as the baseline.
Example: NEEDLEBASE 0
GRAFSYS Page 26
NLABELS
Purpose: Number of ruler numeric labels.
Syntax: NLABELS X|Y n
n Number of labels.
Comment: The specified number of labels is the "first
guess" for how many labels will be printed on
the axis ruler. The actual number may change
slightly during plotting to make the nicest
looking plot.
Example: NLABELS X 5
NUMLABSTYLE
Purpose: How numeric ruler labels are printed.
Syntax: NUMLABSTYLE X|Y st
st NUMTICK Numbers and "tick" marks
TICKONLY Tick marks only.
SPACEONLY Space for numbers only.
TICKSPACE Tick marks and space for
numbers.
NONE
Example: NUMLABSTYLE X TICKONLY
ORIENTATION
Purpose: Orientation of plot.
Syntax: ORIENTATION PORTRAIT|LANDSCAPE
Example: ORIENTATION LANDSCAPE
ORIGIN
Purpose: Location of origin on paper.
Syntax: ORIGIN x y
Comment: The origin is the displacement from the lower
left-hand corner of the paper.
Example: ORIGIN 0.5 0.5
GRAFSYS Page 27
PLOTLINE
Purpose: Line attributes used during line plot.
Syntax: PLOTLINE w p c
w Width of line in inches or cm, depending
on UNITS command.
p SOLID, DOTS, SHORTDASH, LONGDASH,
DOTDASH, DOTDOTDASH, HISTOGRAM, NONE.
Comment: These are the line attributes used by
subsequent DATAFILE statements. Good
programming practice dictates that you
include FITWID before every DATAFILE command.
Example: PLOTLINE 0.01 DOTS 1
Depends on: COLORMAP
PLOTSYMBOL
Purpose: Defines plot symbol to assign to subsequent
DATAFILE commands.
Syntax: PLOTSYMBOL sym
sym SQUARE, X, SMALLDOT, DIAMOND, TRIANGLE,
PLUS, NONE
Example: PLOTSYMBOL SMALLDOT
PLOTSYMBSIZE
Purpose: Size of plotting symbols.
Syntax: PLOTSYMBSIZE w
Comment: PLOTSYMBSIZE also affects the width of error
bar end caps.
Example: PLOTSYMBSIZE 0.05
GRAFSYS Page 28
PLOTSYMBLINE
Purpose: Plot symbol line attributes.
Syntax: PLOTSYMBLINE w p c
w Thickness of line
p SOLID, DOTS, SHORTDASH, LONGDASH,
DOTDASH, DOTDOTDASH, NONE
c Color in user units.
Example: PLOTSYMBLINE 0.01 SOLID 1
PLOTTEXT
Purpose: Place text anywhere on plot.
Syntax: PLOTTEXT x y ang ht col 'string'
x y Location of lower left-hand corner of
text string in inches from lower left-
hand corner of plot.
Comment: See DATATEXT above for a more thorough
description of this command.
PLOTTITLE
Purpose: Title of plot.
Syntax: PLOTTITLE 'title'
Example: PLOTTITLE 'Title of Plot'
QUIT
Purpose: Terminate GRAFSYS entirely.
Syntax: QUIT
Comment: This command causes GRAFSYS to terminate
immediately, and return control to DOS. Even
if you use a QUIT command, you must still
have an END command after it to signify the
end of the command file.
Example: QUIT
GRAFSYS Page 29
RANGING
Purpose: Auto or manual ranging.
Syntax: RANGING X|Y AUTO|MANUAL[ min max]
min,max Minimum and maximum bounds for
axis. Only needed if MANUAL is
used.
Example: RANGING X AUTO 1.34 1.56
RANGING Y MANUAL
RELEASE
Purpose: Release a plot to a device.
Syntax: RELEASE dev[ w h]
dev SCRN, HP, POST, DMP
w,h Width and height of plot in inches.
Comment: Width and height are not needed for screen
plotting. For hardcopy devices, output will
be sent to path named in last DEVICEPATH
command.
Example: RELEASE SCRN
RELEASE DMP 5 6.5
RESOLUTION
Purpose: Set resolution for dot-matrix plotting.
Syntax: RESOLUTION r
r LOW, MEDIUM
Comment: The following print resolutions are available
for dot-matrix plotting:
Low: 60 X 72 dpi
Medium: 120 X 72 dpi
Example: RESOLUTION LOW
GRAFSYS Page 30
REVERSEAXIS
Purpose: Reverse an axis.
Syntax: REVERSEAXIS X|Y NO|YES
Example: REVERSEAXIS X YES
RULERENDS
Purpose: Force labels at the ends of the axis rulers.
Syntax: RULERENDS X|Y YES|NO
Example: RULERENDS X YES
RULERTEXT
Purpose: Attributes of ruler numbers.
Syntax: RULERTEXT h c
h Height of character.
c Color in user units.
Example: RULERTEXT 0.1
RULERTICKSIZE
Purpose: Size of tick mark on axis ruler.
Syntax: RULERTICKSIZE l
Example: RULERTICKSIZE 0.1
GRAFSYS Page 31
SCALE
Purpose: Sets axis scaling.
Syntax: SCALE X|Y LINEAR|LOG|DB10|DB20
Comment: Chooses the method of scaling an axis. The
two kinds of dB scaling are:
DB10: dB = 10 log r
DB20: dB = 20 log r
where r is the X or Y value.
Example: SCALE X LOG
SCRNSIZE
Purpose: Indicate physical size of graphics screen to
GRAFSYS.
Syntax: SCRNSIZE x y
Comment: In order to correctly scale characters on the
screen, GRAFSYS needs to know how big the
screen is. You should measure your screen's
active area and provide the dimensions to
GRAFSYS. The defaults in INITOPT.CMD are for
a "standard" 12-inch diagonal screen.
Example: SCRNSIZE 8.5 5.75
TEXTPENRATIO
Purpose: Set ratio of text pen width to character
height.
Syntax: TEXTPENRATIO r
r Ratio
Comment: GRAFSYS generates its own characters from a
built-in vector font. The characters are
rendered as a series of line segments. This
command adjusts how fat the line used to
print the characters will be. Increasing the
ratio will make the characters more "bold."
Example: TEXTPENRATIO 0.05
GRAFSYS Page 32
TICKLINE
Purpose: Line attributes for tick marks.
Syntax: TICKLINE w p c
w Width of line
p SOLID, DOTS, SHORTDASH, LONGDASH,
DOTDASH, DOTDOTDASH, NONE
c Color in user units.
Example: TICKLINE 0.01 SOLID 1
TITLETEXT
Purpose: Attributes of title.
Syntax: TITLETEXT h c
h Height of character.
c Color in user units.
Example: TITLETEXT 0.1 1
UPPERTICKS
Purpose: Select whether or not to display tick marks
on the upper and right hand rulers when
"full" ruler box is selected.
Syntax: UPPERTICKS YES|NO
See also: FULLBOX
Example: UPPERTICKS YES
ZEROAXIS
Purpose: Draw x = 0 or y = 0 axes.
Syntax: ZEROAXIS X|Y YES|NO
Example: ZEROAXIS X NO
GRAFSYS Page 33
IX. CHARACTER FONT
A. Introduction
GRAFSYS uses a special built-in font, and can generate
all the stand ASCII characters, as well as the Greek
alphabet, mathematical, and other special symbols. In
addition, there is a limited capability for subscripts
and superscripts. The GRAFSYS font was designed to
resemble the font used in most plots in the Physical
Review journals.
B. Typing Strings
Characters that don't appear on the keyboard are
referred to by putting the name between two backslash
characters. Here are some examples:
Title of Plot
E = \hbar\\omega\.
E = mc\sup\2
If you misspell a character name, or forget a
backslash, then the unidentifiable character will be
rendered as a "nc" symbol. This is a tiny "n" and "c"
in a single character cell.
C. List of special characters
UNIDENTIFIED CHARACTER
nc
UPPERCASE GREEK LETTERS
UGamma
UDelta
UTheta
ULambda
Uxi
UPi
USigma
UUpsilon
UPhi
LOWERCASE GREEK LETTERS
alpha
beta
gamma
delta
GRAFSYS Page 34
epsilon Little "E"
varepsilon Looks like backwards "3".
zeta
eta
theta O with bar across it.
vartheta "Script" theta.
iota
kappa
lambda
mu
nu
xi
pi
rho
sigma
tau
upsilon
phi O with vertical bar.
varphi "Script" phi.
chi
psi
omega
MATHEMATICAL SYMBOLS
approx Squiggly "=" sign.
cong "=" sign with a squiggle over it.
bullet Filled in little circle.
neqiv Not equivalent.
cents Cents sign.
owns Backwards epsilon.
nabla "Del" operator.
partial Partial derivative operator.
ell Script "l"
circ Little circle, not filled.
times Little "x" for multiplication.
parallel Two vertical parallel bars.
perp Perpendicular sign.
angle Angle sign.
therefore Three dots.
infinity Lazy 8.
ne Not equal.
equiv Equivalent.
leq Less than or equal to.
geq Greater than or equal to.
propto Proportional to.
rightarr Right arrow.
uparr Up arrow.
leftarr Left arrow.
downarr Down arrow.
rad Radical sign.
GRAFSYS Page 35
int Integral sign.
oint Loop integral sign.
dagger
ddagger
exists Backwards "E"
odot Circle with dot inside it.
bra Like "<" but skinny.
ket Like ">" but skinny.
pm Plus/minus.
mp Minus/plus.
div Division sign.
cdot Centered dot for multiplication.
OTHER POTENTIALLY USEFUL SYMBOLS
spadesuit "Spades" card suit.
heartsuit "Hearts" card suit.
diamondsuit "Diamonds" card suit.
clubsuit "Clubs" card suit.
shamrock For Notre Dame fans.
Quebec Fleur de Li.
backslash \
diamond
star
square
triangle
circle
ground
greekcross
crescent
starofdavid
D. Subscripts and Superscripts
GRAFSYS has a rudimentary way of handling subscripts
and superscripts. There are two special codes:
\sub\
\sup\
Sub moves the "pen" down 1/2 character height, and sup
moves it up 1/2 character height. Hence, sub turns on
subscripts, and they can be turned back off by sup, and
vice versa. Examples:
E = mc\sup\2
Drink plenty of H\sub\2\sup\O!
GRAFSYS Page 36
X. DEVICE AND COLOR SUPPORT REFERENCE
A. Introduction
This section documents the the differences in how
GRAFSYS handles the various devices. Most users will
not need to use this section, unless they want to set
GRAFSYS up for color operation.
B. Color Maps
GRAFSYS uses a color map scheme to improve user-
friendliness. Each device renders color differently,
but after setting up the maps, the same integer will
specify the same color, regardless of device.
The basic syntax of the COLORMAP command is as follows:
COLORMAP dev n r
dev SCRN, HP, POST, DMP
n "User" color value, from 0 to 15.
r "Device" color value.
The user value is the number used in other GRAFSYS
commands, such as AXISLINE. The device value is the
number which is actually sent to the device, and may be
an integer or real.
If you define a user color for one device, you must
define it for all devices. There are no defaults for
color maps.
C. Device Support
1. Screen
The screen driver supports color fully. Device
color values are integers, and depend on which
graphics card you have. If you have a Hercules
card, you must be careful about how to use the
BACKGROUND and MENUCOLOR commands. When in the
text mode, colors are interpreted as text
attributes, such as underline. Always refer to
the documentation for your screen hardware.
The screen driver does not support variable pen
width. All lines will be drawn one pixel wide.
GRAFSYS Page 37
2. HP-GL
Device color values are integer pen numbers.
GRAFSYS does not know how many pens your
particular plotter has.
The HP driver does not variable pen width,
although pens with different tip sizes may be
loaded into the carousel, and selected as
different "colors." The PrintGL also has a
facility for turning pen numbers into pen widths
for raster devices like the LaserJet.
3. Postscript
Device color values are reals from 0 to 1, and are
interpreted as gray scales. 0 corresponds to
"black" and 1 is white, or whatever color paper
you put in.
Variable pen width is supported.
4. Dot-matrix
No color is supported. The background is always
white and foreground black. To permit a black
background would destroy your print head very
quickly.
Variable pen width is not supported. All lines
are drawn one pixel wide. PrintGL has a dot
matrix print driver which supports variable pen
width.
XI. PRINTGL SOFTWARE AND THE LASERJET
GRAFSYS supports only a limited number of hardcopy output
devices, and in particular does not support the HP LaserJet,
which is the most popular laser printer for PC- and MS-DOS
computers. GRAFSYS is bundled with a Shareware package
called PrintGL. Since the entire PrintGL package is
included, you can distribute it along with GRAFSYS. If,
after evaluating PrintGL, you decide to use it, you should
pay the registration fee.
A. Install the Software
The PrintGL software is contained in the archive file
called PRINTGL.ZIP The section above on installation
describes how to unzip a ZIP file. You should also
unpack GPRINT.ZIP, which is inside UTILITY.ZIP.
GRAFSYS Page 38
B. Create a GRAFSYS Plot
Create a GRAFSYS plot, and plot to a file, selecting
HP-GL as the output format. These examples will assume
that you have named the file OUT.PLT, but you could
substitute any other name. Now exit GRAFSYS.
C. Run GPRINT
GRAFSYS comes with a program called GPRINT.EXE which
provides menu-driven control of PrintGL. Just type:
GPRINT
or
GPRINT OUT.PLT
GPRINT will allow you to select the target output
device and resolution, then will run PrintGL for you.
D. Other Features
PrintGL can also be run on its own. It has more
features than I could possibly do justice to here. You
are encouraged to read the documentation file
PRINTGL.DOC. This is a very fine piece of work.
GRAFSYS Page 39
XII. FGRAPH MATHEMATICAL FUNCTION GRAPHING PROGRAM
A. Introduction
FGRAPH is a simple utility for plotting math functions.
It acts as a "shell" around GRAFSYS, by producing a
GRAFSYS plot file, running GRAFSYS, and then returning
to FGRAPH again. Thus, you can type in a function,
look at its graph, then edit it again for another try.
FGRAPH has a built-in symbolic expression parser and
evaluator, so that no compiler is needed to use it. It
has a one-screen menu, with a small handful of options
for setting plot limits, and saving and loading files.
B. Running FGRAPH
To run FGRAPH just type:
FGRAPH
C. Expression Syntax
Just about any expression which you would type in, say,
BASIC, Pascal, or FORTRAN, is allowed in FGRAPH. Here
are some examples:
1 + x*2*(3 - x)
1 + sqrt(x)
exp(-sqr(x))
(3 + x)*(4 - x)
2^x
Note that the carat (^) denotes exponentiation. Do not
use the double-star (**) for this. There is no limit
to the level of parentheses, until you run out of the
32K "stack" space for the program. This is unlikely.
The maximum length of the expression is 255 characters.
Exponentiation (^) is not associative. For instance,
1^2^3 is not ambiguous, since (1^2)^3 is not equal to
1^(2^3). An expression like a^b^c will cause an error
message in FGRAPH. However a^(b^c) is OK, since there
is no ambiguity.
The following functions are supported:
sqr(x) Square of x.
sqrt(x) Square root of x.
exp(x) Exponential of x (e^x).
GRAFSYS Page 40
ln(x) Natural logarithm of x.
log(x) Common or base-10 logarithm of x.
sin(x) Sine of x (x in radians).
cos(x) Cosine of x.
tan(x) Tangent of x.
arcsin(x) Inverse sine of x, in radians.
arccos(x) Inverse cosine of x.
arctan(x) Inverse tangent of x.
abs(x) Absolute value of x.
sgn(x) "Signum" function:
sgn(x > 0) = 1
sgn(0) = 0
sgn(x < 0) = -1
int(x) Greatest integer less than or equal to
x.
GRAFSYS Page 41
XIII. WARRANTY DISCLAIMER
GRAFSYS is not intended to be a consumer product. It is
distributed with no warranty, express or implied. As a
professional, you are fully responsible for what you
publish. Use of this product acknowledges that you have
sufficient competence to evaluate the output of the GRAFSYS
program, and determine its suitability for publication or
other use. The user must bear all responsibility for direct
or indirect consequences of use of GRAFSYS.
The author of GRAFSYS disclaims all warranties, express or
implied, including, without limitation, the warranties of
merchantability and of fitness of this product for any
purpose. The author assumes no liability for damages direct
or consequential, which may result from use of this program,
including loss of data or any other reason. In no event
shall the author's liability for any damages ever exceed the
price paid for the license to use software, regardless of
the form of the claim. The person using the software bears
all risk as to the quality and performance of the software.
XIV. TRADEMARKS AND ACKNOWLEDGEMENTS
This documentation makes reference to the following
companies' trademarks:
Epson: Epson America
HP, LaserJet: Hewlett-Packard Corp.
LaserWriter, Apple: Apple Computer
MS-DOS: Microsoft
Postscript: Adobe Corp.
Hercules: Hercules Corp.
IBM: IBM Corp.
Designer: Micrografx Corp.
Although GRAFSYS uses a P.O. Box at the Notre Dame, Indiana
post office, the GRAFSYS business is not affiliated in any
way with the University of Notre Dame du Lac. The GRAFSYS
business receives no material support from the University.
GRAFSYS ORDER FORM
Remit to: From:______________________________
Francis J. Deck Address:___________________________
P.O. Box 611
Notre Dame, IN 46556-0611 ___________________________________
___________________________________
_________________________________________________________________
Quantity Item Unit Price: Extended:
________ ____ ___________ _________
GRAFSYS Software License,
________ Standard Price $35.00 _________
GRAFSYS Software License,
________ Student Price* $15.00 _________
GRAFSYS Distribution Disk,
________ without license. $15.00 _________
Sub Total: _________
If applicable, add 5% of sub-total for
Indiana sales tax: _________
Total: _________
* To qualify for the student price, you must supply the name of
your educational institution and student number.
Disk size: 3.5"_______ 5.25"_______
Name of School:_________________________________________________
Student Number:_________________________________________________
Make checks payable to: Francis J. Deck
Terms: Personal check or money order for U.S. funds payable
through a U.S. bank. Purchase orders (net 30) are accepted from
schools, government, and businesses in U.S. and Canada. You will
be sent a diskette containing the latest version of GRAFSYS.
Please indicate preferred disk size above.
Site licenses are available for GRAFSYS. See GRAFSYS.DOC.